

		var dataUrl = 'https://inewu.api.moyoz.online/api';
		var mobileDevice = false;
		var langOpt = [
			{name:'中文',src:'img/lang/cn.png',value:'zh_CN',val:'chinese_simplified'},
			{name:'Tiếng Việt',src:'img/lang/vn.png',value:'',val:'vietnamese'},
			{name:'English',src:'img/lang/usa.png',value:'us_EN',val:'english'},
			{name:'Français',src:'img/lang/fre.png',value:'',val:'french'},
			{name:'Deutsch',src:'img/lang/gem.png',value:'',val:'deutsch'},
			{name:'हिंदी',src:'img/lang/india.png',value:'',val:'hindi'},
		];
		var ifMounted = false;
		function GetQueryString(name) {  
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
			var r = window.location.search.substr(1).match(reg);  //获取url中"?"符后的字符串并正则匹配
			var context = "";  
			if (r != null)  
				 context = r[2];  
			reg = null;  
			r = null;  
			return context == null || context == "" || context == "undefined" ? "" : context;  
		}
		function paramsUrl(obj){
			var url = [];
			for(var i in obj){
				url.push(i + '=' + obj[i]);
			}
			return url.join('&');
		}
		function swtClass(elName,ind,cls){
			var clsName = cls?cls:'active';
			if(ind >= 0){
				$(elName).removeClass(clsName);
				$(elName).eq(ind).addClass(clsName);
			}else{
				if($(elName)[0].className.indexOf(clsName) >= 0){
					$(elName).removeClass(clsName);
				}else{
					$(elName).addClass(clsName);
				}
			}
		}

		function clearBrParent(className,ifLi){
			if(ifLi){
				$(className).find('br').parents('li').remove();
			}
            $(className).find('br').parent().remove();
		}

		function whetherHaveIt(thing,val,type){
			if(type == 'ele'){
				return ($(thing)[0].className.indexOf(val) >= 0?true:false);
			}else{
				return (thing.indexOf(val) >= 0?true:false);
			}
		}

		function fltrCate(ary,keyName,cateAry){
			var cateList = !cateAry?[]:cateAry;
			for(var s = 0;s < ary.length;s++){
				if(!whetherHaveIt(cateList,ary[s][keyName])){
					cateList.push(ary[s][keyName]);
					continue;
				}
			}
			return cateList;
		}

		function newObj(obj){
			return JSON.parse(JSON.stringify(obj));
		}
		
		function getSpecifyItem(ary,val,keyName){
			for(var s = 0;s < ary.length;s++){
				if(ary[s][keyName] == val){
					return ary[s];
				}
			}
		}
		
		function getSpecifyVal(ary,val,cprKeyName,rtnKeyName){
			for(var s = 0;s < ary.length;s++){
				if(ary[s][cprKeyName] == val){
					return ary[s][rtnKeyName];
				}
			}
		}

		function getSpecifyValItem(ary,val,cprKeyName,rtnKeyName){
			var list = [];
			for(var s = 0;s < ary.length;s++){
				if(ary[s][cprKeyName] == val){
					list.push(ary[s][rtnKeyName]);
				}
			}
			return list;
		}
		
		function getCheckedOpt(optAry,chckedAry,cprKeyName,rtnKeyName){
			var list = [];
			optAry.forEach(function(item){
				for(var s = 0;s < chckedAry.length;s++){
					if(item[cprKeyName] == chckedAry[s]){
						list.push(item[rtnKeyName]);
						break;
					}
				}
			})
			return list;
		}
		
		function getMatchedItm(ary,val,keyName){
			var list = [];
			console.log(val);
			ary.forEach(function(item){
				if(typeof(ary[0]) == 'object'){
					
					if(item[keyName] == val){
						list.push(item);
					}
				}else{
					if(item == val){
						list.push(item);
					}
				}
				
			})
			
			return list;
		}
		
		function getMatchedIndex(ary, val, keyName) {
			if(keyName){
				return ary.findIndex(item => val == item[keyName]);
			}else{
				return ary.findIndex(item => val == item);
			}
			
		}
		
		function getSpecifyKeysVal(ary,keyName){
			var list = [];
			for(var s = 0;s < ary.length;s++){
				list.push(ary[s][keyName])
			}
			return list;
		}

		function timeFormat(timestamp){
			var t = new Date(timestamp);//row 表示一行数据, dateTime 表示要格式化的字段名称
			var year = t.getFullYear(),
			month = t.getMonth() + 1,
			day = t.getDate(),
			hour = t.getHours(),
			min = t.getMinutes(),
			sec = t.getSeconds();
			var newTime = year + '-' +
			(month<10?('0' + month):month) + '-' +
			(day<10?('0' + day):day) +' ' +
			(hour<10?('0' + hour):hour) +':' +
			(min<10?('0' + min):min) +':' +
			(sec<10?('0' + sec):sec);
			return newTime;
		}

		function getTtlVal(ary,key){
			var ttlVal = 0;
			ary.forEach(function(item,i){
				if(key){
					ttlVal += Number(item[key]);
				}else{
					ttlVal += item;
				}
			})
			return ttlVal;
		}

		function compare(keyname,order){
			//desc降序 默认升序
			return function(a,b){
			  var value1 = a[keyname];
			  var value2 = b[keyname];
			  if(order){
				return value2 - value1;
			  }else{
				return value1 - value2;
			  }
			}
		}

		function splitTime(ary){
			ary.forEach(function(item){
				item.crtTime = item.createTime.split(' ')[0];
			})
			return ary;
		}

		// var currLang = getSpecifyVal(langOpt,translate.language.getCurrent(),'val','value');

		